package com.lancer.designPattren.c01simpleFactory;

/**
 * 除法类
 */
public class OperationDiv extends Operation{

    @Override
    public double getResult() throws Exception {
        if(this.get_numberB() == 0)
            throw new Exception("除数不能为0");

        return this.get_numberA() / this.get_numberB();
    }
}
